{% extends "student/stu_header.html" %}
{% block context %}
    <div class="page_header">
        <h3 align="center">课程表</h3>
    </div>
    <div class="container">
        <table class="table table-hover">
            <tr>
                <th scope="col">课程编号</th>
                <th scope="col">成绩</th>
            </tr>
            </thead>
            <tbody>
            {% for course in courses %}
                <tr>
                    <td>{{ course.course_id }}</td>
                    <td>{{ course.score }}</td>
                    {%if course.score == NONE %}
                    <td><button type="submit" class="btn btn-danger" onclick="window.location.href='/stu_course_delete?student_choice_id={{ course.student_choice_id }}'">删除</button></td>
                    {%else%}
                    <td><button type="submit" class="btn btn-info">查看</button></td>>
                    {%endif%}
                </tr>
            {% empty %}
                <div class="alert alert-warning" role="alert">
                    <strong>注意</strong>
                    你还没有选择课程
                </div>
            {% endfor %}
            </tbody>
        </table>
    </div>
{% endblock context %}